package com.speak.sparkadminserver.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.speak.sparkadminserver.domain.NutRole;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @version 1.0
 * @Author Xing
 * @Date 2023/2/17 20:17
 */
@Mapper
public interface NutRoleDao extends BaseMapper<NutRole> {
    @Select("SELECT id FROM nut_role WHERE user_id = #{userId}")
    public List<Long> getRole(@Param("userId") Long userId);

    @Select("SELECT id FROM nut_role where user_id = #{userId}")
    public Long GetroleId(@Param("userId") Long userId);
}
